class AreasController < ApplicationController
  # for xhr, return areas list
  def list
    if params[:id].blank?
      @areas = Area.roots
    else
      @parent = Area.find(params[:id])
      @areas = @parent.children
    end
  end
end
